let o = { 'a': 1 }
let u = { 'b': 2 }
const map = new Map()
  .set('foo', true)
  .set('bar', false)
  .set(o, 1)
  .set(u, 2)
const obj = {}

console.log(Object.fromEntries(map));

// map.forEach((val, key) => {
//   obj[JSON.stringify(key)] = val
// })
// console.log(obj);